package com.mrzhou.pool;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.InetAddress;
import java.text.NumberFormat;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.ReentrantLock;

public class ThreadDemo {

    public static void main(String[] args) throws Exception {
        long start = System.currentTimeMillis();
        BigDecimal decimal = new BigDecimal("1000000000000000055511151231257827021181583404541015625");
        BigDecimal divide = new BigDecimal("9865667999999999998");
        System.out.println(decimal.divide(divide, Integer.MAX_VALUE, RoundingMode.HALF_DOWN));
        System.out.println("计算花费时间: " + (System.currentTimeMillis() - start));
        /*MyThread t = new MyThread();
        Thread thread1 = new Thread(t);
        Thread thread2 = new Thread(t);
        thread1.start();
        thread2.start();*/
    }

}

class MyThread implements Runnable {

    private AtomicInteger count = new AtomicInteger(0);

    @Override
    public void run() {
        for (int i = 0; i < 10000; i++) {
            count.incrementAndGet();
        }
        System.out.println(count);
    }
}


